﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Drawing;
using System.Windows.Forms;

namespace nbcs_chess_squad
{
    class BoardSquare : PictureBox
    {
        //
        //Attributes
        //
        private Piece _currentPiece = new Piece();
        //Piece array coordinates
        private Coordinates _squareCoordinates;
        //Array number of currentpiece
        private int _arrayNumber;


        //Properties
        public Piece Piece
        {
            get { return _currentPiece; }
            set { _currentPiece = value; }
        }

        public Coordinates Coordinates
        {
            get { return _squareCoordinates; }
            set { _squareCoordinates = value; }
        }

        public int ArrayNumber
        {
            get { return _arrayNumber; }
            set { _arrayNumber = value; }
        }


        public BoardSquare()
        {

        }

        //Default Constructor
        public BoardSquare(int x, int y)
        {
            _currentPiece = null;
            _squareCoordinates = new Coordinates();
            Width = 50;
            Height = 50;
            BackColor = Color.Transparent;
            Location = new Point((x * 50) + 29, 376 - (y * 50));
            Name = "pbSquare" + x.ToString() + y.ToString();
            Coordinates.X = x;
            Coordinates.Y = y;
        }
    }
}